import request from '@/utils/request'

export function msgBroad(data) {
  return request({
    url: '/plant/msgBroad/query',
    method: 'post',
    data
  })
}

export function addMsgBroad(data) {
  return request({
    url: '/plant/msgBroad/insertOne',
    method: 'post',
    data
  })
}
export function upateById(data) {
  return request({
    url: '/plant/msgBroad/upateById',
    method: 'PUT',
    data
  })
}

export function deleteMsgBroad(id) {
  return request({
    url: `/plant/msgBroad/${id}`,
    method: 'delete'
  })
}
export function firstLabel(data) {
  return request({
    url: '/plant/dictionary/select',
    method: 'post',
    data
  })
}

export function secondLabel(data) {
  return request({
    url: '/plant/dictionary/answerSecondLabel',
    method: 'post',
    data
  })
}

export function getMessage(id) {
  return request({
    url: `/plant/msgBroad/${id}`,
    method: 'get'
  })
}
